package com.vang.chue.capm.entity;

/**
 * Created by IntelliJ IDEA.
 * User: chuevang
 * Date: 11/9/11
 * Time: 9:30 PM
 * To change this template use File | Settings | File Templates.
 */
public class Collective {
    private long id;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    private int collectiveTypeId;

    public int getCollectiveTypeId() {
        return collectiveTypeId;
    }

    public void setCollectiveTypeId(int collectiveTypeId) {
        this.collectiveTypeId = collectiveTypeId;
    }

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Collective that = (Collective) o;

        if (collectiveTypeId != that.collectiveTypeId) return false;
        if (id != that.id) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (id ^ (id >>> 32));
        result = 31 * result + collectiveTypeId;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        return result;
    }
}
